package exp.algorithm;

import timeseriesweka.classifiers.AbstractClassifierWithTrainingData;

import java.io.Serializable;

import org.slf4j.Logger;

import weka.classifiers.AbstractClassifier;
import weka.classifiers.Classifier;
import weka.core.Instance;
import weka.core.Instances;
import weka.core.TechnicalInformation;
import utilities.SaveParameterInfo;
import utilities.TrainAccuracyEstimate;
import utilities.ClassifierResults;

/**
 * @author Alex
 *
 */
public class WrapperClassifier extends AbstractClassifierWithTrainingData
		implements SaveParameterInfo, TrainAccuracyEstimate ,Serializable{
	private static final long serialVersionUID = 5895654647529660601L;
	Logger log = org.slf4j.LoggerFactory.getLogger(WrapperClassifier.class);
	Classifier innerClassifier;
	public WrapperClassifier(InnerClassifierType ict) {
		innerClassifier = ict.getClassifier();
	}
	public WrapperClassifier(Classifier c) {
		this.innerClassifier = c;
	}
	@Override
	public void writeCVTrainToFile(String train) {
	}

	@Override
	public boolean findsTrainAccuracyEstimate() {
		return false;
	}

	@Override
	public ClassifierResults getTrainResults() {
		return trainResults;
	}

	@Override
	public String getParameters() {
		return super.getParameters() ;
	}

	public TechnicalInformation getTechnicalInformation() {
		TechnicalInformation result;
		result = new TechnicalInformation(TechnicalInformation.Type.ARTICLE);
		return result;
	}

	@Override
	public void buildClassifier(Instances data) throws Exception {
		innerClassifier.buildClassifier(data);
	}

	@Override
	public double[] distributionForInstance(Instance ins) throws Exception {
		return innerClassifier.distributionForInstance(ins);
	}
	public String toString(){
		return innerClassifier.toString();
	}

}
